﻿IF EXISTS (SELECT * from sys.procedures p left join sys.schemas s on p.schema_id = s.schema_id where p.name='geolocalisation_select' and s.name='Meta')
DROP PROCEDURE [Meta].geolocalisation_select
GO
CREATE PROCEDURE [Meta].geolocalisation_select 
@PK uniqueidentifier
AS
BEGIN
SELECT 	
	[Meta].[Geolocalisation].[id_reference] AS [PK],
	[Geolocalisation].[point].Lat AS [Latitude],
	[Geolocalisation].[point].Long AS [Longitude],
	[Geolocalisation].[display_name] AS [DisplayName],
	[Geolocalisation].[item_type] AS [ItemType]
FROM 
	[Meta].[Geolocalisation] 
WHERE
	[Meta].[Geolocalisation].[id_reference] = @PK 
END